﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>@ViewBag.Title - 我的 ASP.NET 应用程序</title>
    <link href="~/layui/css/layui.css" rel="stylesheet" />
    <script src="~/js/modernizr-2.6.2.js"></script>
    @RenderSection("css", required: false)
</head>
<body class="layui-layout-body">

    <div class="layui-layout layui-layout-admin">

        @*头部区域（可配合layui已有的水平导航）*@
        <div class="layui-header">
            <div class="layui-logo">后台管理</div>
            @*左边*@
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item"><a href="">控制台</a></li>
                <li class="layui-nav-item"><a href="">商品管理</a></li>
                <li class="layui-nav-item"><a href="">用户</a></li>
                <li class="layui-nav-item">
                    <a href="javascript:;">其他系统</a>
                    <dl class="layui-nav-child">
                        <dd><a href="">邮件管理</a></dd>
                        <dd><a href="">消息管理</a></dd>
                        <dd><a href="">授权管理</a></dd>
                    </dl>
                </li>
            </ul>
            @*右边*@
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <img src="http://t.cn/RCzsdCq" class="layui-nav-img" />
                        测试
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="">基本资料</a></dd>
                        <dd><a href="">安全设置</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href="">退出系统</a></li>
            </ul>

        </div>

        @*左侧导航区域（可配合layui已有的垂直导航）*@
        @*@Html.Action("LeftNav", "Home");*@
        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <ul class="layui-nav layui-nav-tree" lay-filter="navClick">
                    <li class="layui-nav-item">
                        <a class="" href="javascript:;">系统管理</a>
                        <dl class="layui-nav-child">
                            <dd id="vistor"><a href="/Admin/System/Vistor?menuId=vistor">访问统计</a></dd>
                            <dd id="statistics"><a href="/Admin/System/Statistics?menuId=statistics">用户统计</a></dd>
                            <dd><a href="/Home/About">Home</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">博客管理</a>
                        <dl class="layui-nav-child">
                            <dd id="articleList"><a href="/Admin/Blog/ArticleList?menuId=articleList">博客列表</a></dd>
                            <dd id="articleAdd"><a href="/Admin/Blog/Add?menuId=articleAdd">发布博客</a></dd>
                            <dd id="test"><a href="/Admin/Blog/Test?menuId=test">测试</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">文章类别管理</a>
                        <dl class="layui-nav-child">
                            <dd id="categoryList"><a href="/Admin/Blog/CategoryList?menuId=categoryList">类别列表</a></dd>
                            <dd id="categoryAdd"><a href="/Admin/Blog/CategoryAdd?menuId=categoryAdd">新增类别</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">前台公告管理</a>
                        <dl class="layui-nav-child">
                            <dd id="tipsList"><a href="/Admin/Blog/TipsList?menuId=tipsList">公告列表</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">广告管理</a>
                        <dl class="layui-nav-child">
                            <dd id="adManage"><a href="/Admin/Advertisment/AdManage?menuId=adManage">轮播图管理</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">关于</a>
                        <dl class="layui-nav-child">
                            <dd id="aboutAuthor"><a href="/Admin/Blog/AboutAuthor?aboutAuthor">关于作者</a></dd>
                            <dd id="aboutBlog"><a href="/Admin/Blog/AboutBlog?aboutBlog">关于博客</a></dd>
                            <dd id="messageWall"><a href="/Admin/Blog/messageList?messageWall">留言墙</a></dd>
                            <dd id="thirdPartyLink"><a href="/Admin/Blog/thirdPartyLink?thirdPartyLink">第三方链接</a></dd>
                            <dd id="timeAxis"><a href="/Admin/Blog/timeAxis?timeAxis">时光轴</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">资源分享</a>
                        <dl class="layui-nav-child">
                            <dd id="resourceSharing"><a href="/Admin/Blog/sharingList?resourceSharing">分享列表</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item"><a href="">云市场</a></li>
                    <li class="layui-nav-item"><a href="">发布产品</a></li>
                </ul>
            </div>
        </div>

        @*内容主题区域*@
        <div class="layui-body">
            @RenderBody()
        </div>

        @*底部固定区域*@
        <div class="layui-footer text-center">
            <p>&copy; @DateTime.Now.Year - 我的 ASP.NET 应用程序</p>
        </div>
    </div>


    @*<div class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    @Html.ActionLink("应用程序名称", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li>@Html.ActionLink("主页", "Index", "Home")</li>
                        <li>@Html.ActionLink("关于", "About", "Home")</li>
                        <li>@Html.ActionLink("联系方式", "Contact", "Home")</li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="container body-content">
            @RenderBody()
            <hr />
            <footer>
                <p>&copy; @DateTime.Now.Year - 我的 ASP.NET 应用程序</p>
            </footer>
        </div>*@

    <script src="~/lib/jquery/dist/jquery.js"></script>
    <script src="~/layui/layui.js"></script>


    <script>
        layui.use('element', function () {
            var element = layui.element;

            // 导航菜单监听
            element.on('nav(navClick)', function (elem) {
                console.log(elem); //得到当前点击的DOM对象
                //$(elem).addClass('layui-this');
            });
        });

        $(document).ready(function () {
            //alert("xxx");
            // 设置菜单展开、选中样式
            var menuId = '@Context.Request.Query["menuId"]';

            if (menuId == null || menuId == '' || menuId == undefined) {
                var referer = '@Context.Request.Headers["referer"]';

                menuId = referer.slice(referer.indexOf('=') + 1);
                console.log(menuId);
            }

            // 展开上级
            $("#" + menuId).parent().parent().addClass('layui-nav-itemed')
            $("#" + menuId).addClass('layui-this');
        })
    </script>
    <script src="~/js/jquery.unobtrusive-ajax.min.js"></script>
    @RenderSection("scripts", required: false)
</body>
</html>
